<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="../ExtChain.js"></script>
<script>
<!-- copy & pasted then modified to use extChainjs -->
fireunit.ok( ExtChain !== "undefined"  , "ExtChain lib file in scope");

<!-- This is a big one, if I let a syntax error through it usually trainwrecks the entire class -->
fireunit.ok( ExtChain() instanceof Object , "Self-instantiation works");


//Regex created tests!
fireunit.ok(ExtChain().checked().p() == {checked:true},"Single chain checked works");
fireunit.ok(ExtChain().closable().p() == {closable:true},"Single chain closable works");
fireunit.ok(ExtChain().collapsible().p() == {collapsible:true},"Single chain collapsible works");
fireunit.ok(ExtChain().draggable().p() == {draggable:true},"Single chain draggable works");
fireunit.ok(ExtChain().minimizable().p() == {minimizable:true},"Single chain minimizable works");
fireunit.ok(ExtChain().resizable().p() == {resizable:true},"Single chain resizable works");


fireunit.ok(ExtChain().height(250).p() == {height:250},"Single chain height works");
fireunit.ok(ExtChain().maxSize(150).p() == {maxSize:150},"Single chain maxSize works");
fireunit.ok(ExtChain().minSize(50).p() == {minSize:50},"Single chain minSize works");
fireunit.ok(ExtChain().width(250).p() == {width:250},"Single chain width works");
fireunit.ok(ExtChain().HW(250,250).p() == {height:250,width:250},"Single chain HW works");


fireunit.ok(ExtChain().html("<b>Test html</b>").p() == {html:"<b>Test html</b>"},"Single chain html works");
fireunit.ok(ExtChain().items([1,2,3]).p() == {items:[1,2,3]},"Single chain items works");
fireunit.ok(ExtChain().layout("test").p() == {layout:"test"},"Single chain layout works");


fireunit.ok(ExtChain().text("test").p() == {text:"test"},"Single chain text works");
fireunit.ok(ExtChain().title("test").p() == {title:"test"},"Single chain title works");

fireunit.ok(ExtChain().AddItem({foo:"bar"}).p() == {items:[{foo:"bar"}]},"Single chain AddItem works");
fireunit.ok(ExtChain().Behaviors(true,true,true).p() == {Behaviors:"test"},"Single chain Behaviors works");

fireunit.ok(ExtChain().region("north").p() == {region:"north"},"Single chain region works");
fireunit.ok(ExtChain().CENTER().p() == {region:"centor"},"Single chain CENTER works");
fireunit.ok(ExtChain().EAST().p() == {region:"east"},"Single chain EAST works");
fireunit.ok(ExtChain().NORTH("test").p() == {region:"north"},"Single chain NORTH works");
fireunit.ok(ExtChain().SOUTH("test").p() == {region:"south"},"Single chain SOUTH works");
fireunit.ok(ExtChain().WEST("test").p() == {region:"west"},"Single chain WEST works");

fireunit.ok(ExtChain().Merge({hello:"world"}).p() == {hello:"world"},"Single chain Merge works");

fireunit.ok(ExtChain().p() == {},"Single chain p works");




fireunit.testDone();
</script>
</head>
<body/>
</html>